import java.util.ArrayList;
import java.util.List;
import java.util.Queue;

public class Test {
    public static void main(String[] args) {
          Tree tree =new Tree();
         Tree.TreeNode root = tree.node();
        System.out.println("前序遍历");
        tree.preOrder(root);
        System.out.println("前序遍历");
        List <Character> A = tree.preorderTraversal1(root);
        for (Character X :A){
            System.out.println(X);
        }

        /*System.out.println("中序遍历");
        tree.inOrder(root);
        System.out.println("后序遍历");
        tree.postOrder(root);
       int sa =tree.getHeight(root);
        System.out.println(sa);
       tree.size(root);
        System.out.println("二叉树共有多少节点: "+tree.size1 );

        tree.getLeafNodeCount(root);
        System.out.println("叶子节点的个数: "+tree.NodeCount);
        System.out.println("问题思路-求叶子结点个数+叶子节点的个数: "+tree.getLeafNodeCount1(root));
        System.out.println("第层节点的个数: "+tree.getKLevelNodeCount(root, 3));
        System.out.println(tree.find(root, 'A'));
        System.out.println(tree.find(root, 'B'));
        System.out.println(tree.find(root, 'G'));
        tree.invertTree(root);
//        System.out.println("前序遍历");
//        tree.preOrder(root);
       tree.levelOrder(root);
        System.out.println(tree.isCompleteTree(root));*/


    }
}
